<!--
 * @Author: xiaodong 565071984@qq.com
 * @Date: 2022-05-02 19:25:33
 * @LastEditors: xiaodong 565071984@qq.com
 * @LastEditTime: 2022-05-16 21:02:12
 * @FilePath: /小票/src/App.vue
 * @Description: 这是默认设置,请设置`customMade`, 打开koroFileHeader查看配置 进行设置: https://github.com/OBKoro1/koro1FileHeader/wiki/%E9%85%8D%E7%BD%AE
-->
<template>
  <div id="vue-admin-beautiful">
    <router-view />
  </div>
</template>

<script>
  export default {
    name: 'App',
    mounted() {
      this.setLang()
    },
    created() {},
    methods: {
      /**
       * @name: linwc
       * @msg: 设置语言
       * @param {*}
       * @return {*}
       */
      setLang() {
        const lang = this.$route?.query?.lang || 'zh'
        if (this._i18n) {
          this._i18n.locale = lang
        }
        this.$store.dispatch('lang/setLanguage', lang)
        console.log(this.$i18n.locale, '语言包')
      },
    },
  }
</script>
